package com.beta.DB;

import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.content.ContentValues;
import android.content.Context;



public class Passwords extends SQLiteOpenHelper{
	private static final int DATABASE_VERSION = 1;
	private static final String DATABASE_NAME = "Passwords";
	private static final String CREATE_REPLAYS_TABLE ="CREATE TABLE card_info(_id INTEGER PRIMARY KEY AUTOINCREMENT,Passwords INTEGER)";
	private static final String TABLE_NAME = "Passwords";
	private SQLiteDatabase db_passwords;

	public Passwords(Context context){
		super(context,DATABASE_NAME,null,DATABASE_VERSION);
	}
	@Override
	public void onCreate(SQLiteDatabase db_passwords){
		this.db_passwords = db_passwords;
		db_passwords.execSQL(CREATE_REPLAYS_TABLE);
	}
	@Override
	public void onUpgrade(SQLiteDatabase db_password,int oldVersion,int newVersion){

	}
    //change your passwords
	public void change(long new_passwords){
		SQLiteDatabase db_passwords = getWritableDatabase();
		db_passwords.delete(TABLE_NAME,"_id = ?",new String[] {"0"});
		ContentValues values  = new ContentValues();
		if(new_passwords / 100000 == 0){
			values.put("Passwords",new_passwords);
			db_passwords.insert(TABLE_NAME,null,values);
		}
	}


}	

